<template>

    <van-sticky :offset-top="0.1">
        <div class="head" >
            <span>
                <van-icon name="arrow-left" v-show="left" @click="$emit('back')" />
                {{ title }}</span>
            <div>
                <slot>
                </slot>
                <span @click="$emit('list')" class="iconfont icon-fenlei1" v-show="iconbool"  ></span>
                <span class="iconfont icon-sousuo" @click="$emit('find')" v-show="iconbool"></span>
            </div>
        </div>
        
    </van-sticky>

</template>

<script setup>

// import {defineEmits,defineProps} from 'vue'

// const a = ref('星期一')
defineEmits(['list','find','back'])


defineProps({
    title: {
        default: '星期一'
    },
    left: {
        default: false
    },
    iconbool: {
        default: true
    }
})




</script>

<style lang="less" scoped>
.head {
    width: 100vw;
    top: 0;
    display: flex;
    background: url(../img/首页/u19.png) center center/cover no-repeat;
    padding: 20px 0 40px;
    z-index: 10;

    span {
        font-family: "微软雅黑 Bold", "微软雅黑 Regular", "微软雅黑";
        font-weight: 700;
        font-size: 20px;
        color: #ffffff;
    }



    >span {
        position: absolute;
        left: 20px;
    }

    div {
        position: absolute;
        right: 20px;
    }

    div span:nth-of-type(1) {
        margin-right: 10px;
    }
}
</style>